package book;

import java.util.Arrays;

public class BookList {
    private Book[] books ;
    private int bookNums;
    private int usedSize;

    public BookList(int bookNums) {
        books = new Book[bookNums];
        books[0] = new Book("西游记", "吴承恩", 45, "小说");
        books[1] = new Book("三国演义", "罗贯中", 45, "小说");
        this.bookNums = bookNums;
        this.usedSize = 2;
    }

    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }

    public Book getBook(int pos) {
        return books[pos];
    }

    public void setBook(Book book,int pos) {
        books[pos] = book;
    }

    public int getBookNums() {
        return bookNums;
    }

    public void setBookNums(int bookNums) {
        this.bookNums = bookNums;
    }
}
